package reone.android.anytest;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import reone.android.anytest.CalendarTest.MainCalendarActivity;
import reone.android.anytest.CalendarTest2.MainCalendar2Activity;
import reone.android.anytest.CameraTest.MainCameraActivity;
import reone.android.anytest.MyMovieRecorderTest.MyMovieActivity;
import reone.android.anytest.browserViewpagerTest.BrowserViewPagerActivity;
import reone.android.anytest.getwindowTest.GetWindowInfoActivity;
import reone.android.anytest.smallvideo.MainSmallvideoActivity;
import reone.android.anytest.zhyProgressBar.ZhyProgressBarMainActivity;

public class ListMainActivity extends ListActivity {

    private Class[] activityList = new Class[]{
            GetWindowInfoActivity.class,
            BrowserViewPagerActivity.class,
            MainCalendarActivity.class,
            MainCalendar2Activity.class,
            MainCameraActivity.class,
            MainSmallvideoActivity.class,
            MyMovieActivity.class,
            ZhyProgressBarMainActivity.class
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,activityList);
        this.setListAdapter(adapter);
    }

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
        startActivity(new Intent(this,activityList[position]));
    }

}
